package com.h3c.nem.dto;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
    import io.swagger.annotations.ApiModel;
    import io.swagger.annotations.ApiModelProperty;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

/**
 * Copyright (C), 2020-2020, h3c
 * FileName: TbNewerTaskDTO
 *
 * @Author: l22886
 * @Date: 2022-01-24
 * Description: tb_newer_task dto实体
 * Version: 1.0
 */
@ApiModel(value="TbNewerTask对象", description="")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TbNewerTaskDTO {


    @ApiModelProperty(value = "小任务ID")
    @TableId
    private String taskId;

    @ApiModelProperty(value = "小任务名称")
    private String taskName;

    @ApiModelProperty(value = "任务说明")
    private String taskNote;

    @ApiModelProperty(value = "适用对象类型：1 所有新员工；3 按部门使用；")
    private Integer targetType;

    @ApiModelProperty(value = "适用对象的值")
    private String targetConfigValue;

    @ApiModelProperty(value = "适用对象的值,部门名称")
    private String targetConfigValueStr;

    @ApiModelProperty(value = "任务入口")
    private String taskEntry;

    @ApiModelProperty(value = "任务生效日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="Asia/Shanghai")
    private Date taskValidDate;

    @ApiModelProperty(value = "任务失效日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="Asia/Shanghai")
    private Date taskExpireDate;

    @ApiModelProperty(value = "任务完成时限要求json格式字符串（需支持：无限制；N天内；转正前N天）")
    private String taskFinishLimit;

    @ApiModelProperty(value = "适应员工范围：1 当前新员工；2 未来新员工；3 当前和未来的新员工；")
    private Integer taskTargetWorker;

    @ApiModelProperty(value = "审批人类型： 1 直接主管；2 部门接口人；3 HRBP；")
    private Integer approverType;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="Asia/Shanghai")
    private Date createTime;

    @ApiModelProperty(value = "创建人工号/姓名")
    private String creatorInfo;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="Asia/Shanghai")
    private Date updateTime;

    @ApiModelProperty(value = "更新人工号/姓名")
    private String updatorInfo;

    @ApiModelProperty(value = "启用标志：1 未启用；2 已启用；")
    private Integer enableFlag;

    @ApiModelProperty(value = "是否影响转正：1 不影响；2 影响；")
    private Integer effectNormalFlag;

    /**
     * 其他审核人
     */
    private String approverId;

    /**
     * 其他审核人名称
     */
    private String approverName;

    /**
     * 是否可以编辑
     */
    private String canEdit;

    /**
     * 排序字段 + 升序， -降序
     * 比如 +updateTime 根据 修改时间升序排序，-updateTime 根据 修改时间降序排序
     */
    private String orderBy;

    public TbNewerTaskDTO(String taskId, String taskName, String taskNote, String targetConfigValue, String taskEntry,
                          Date taskValidDate, Date taskExpireDate, Integer approverType, String approverId, Integer enableFlag) {
        this.taskId = taskId;
        this.taskName = taskName;
        this.taskNote = taskNote;
        this.targetConfigValue = targetConfigValue;
        this.taskEntry = taskEntry;
        this.taskValidDate = taskValidDate;
        this.taskExpireDate = taskExpireDate;
        this.approverType = approverType;
        this.approverId = approverId;
        this.enableFlag = enableFlag;
    }
}
